package com.huawei.esdk.tp.device.base;

import com.huawei.esdk.platform.common.MessageContext;
import com.huawei.esdk.platform.common.ThreadLocalHolder;
import com.huawei.esdk.platform.nemgr.base.DeviceConnectionBase;
import com.huawei.esdk.tp.common.constants.InfoKeys;

public abstract class TPDeviceConnectionBase extends DeviceConnectionBase
{

	protected TPDeviceConnectionBase(String user, String pwd)
	{
		super(user, pwd);
	}

	public void prepareSessionId(String connId)
	{
		MessageContext mc = ThreadLocalHolder.get();
		if (mc == null)
		{
			mc = new MessageContext();
		}

		mc.getEntities().put(InfoKeys.SDK_SESSION_ID.toString(), connId);
		
		ThreadLocalHolder.set(mc);
	}
}
